<template>
    <div class="message-box">

         <!-- 小熊 对 小猫 的聊天 -->
    <TUIKit
      :SDKAppID="1600075130"
      userID="456"
      userSig="eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwiamZlDh4pTsxIKCzBQlK0MzAwMDc1NDYwOITGpFQWZRKlDc1NTUCCgFES3JzAWJmZsYGphZmpobQU3JTAeampcRke5REGaWkutcUJSRV1aQ5WNuFFQV5lxlYRqjn53jlW9UlRfob1gYkuxoq1QLAJ-xMP4_"
      conversationID="C2C123"
    >
    <!-- 小猫 对 小熊 的聊天 -->
    <!-- <TUIKit
      :SDKAppID="1600075130"
      userID="123"
      userSig="eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwoZGxlDh4pTsxIKCzBQlK0MzAwMDc1NDYwOITGpFQWZRKlDc1NTUCCgFES3JzAWJmZsYWFiamxuYQE3JTAea6uTi6etiYFYR5pRcbB7i5m1R5p5h4JRT7JqW5m1klJJfZOkXlZhdmp7oX2yrVAsAOp8vvA__"
      conversationID="C2C456"
    > -->
      <TUIChat><div></div></TUIChat>
    </TUIKit>

        <!-- <div class="message-content">
            <div class="message-item-other">
                <div class="avatar"></div>
                <div class="content">
                    <div class="name">前端高级面试官</div>
                    <div class="message">请说说你对vue的认识？
                        <span class="time">14:03:56</span>
                    </div>
                </div>
            </div>
            <div class="message-item-self">
                <div class="avatar-self"></div>
                <div class="content-self">
                    <div class="name-self">面试小白</div>
                    <div class="message-self">我对vue不太了解
                        <span class="time-self">14:06:39</span>
                    </div>
                </div>
            </div>
        </div>
        <div class="message-input">
            <a-input placeholder="在这里填写要发送的内容..."></a-input>
            <a-button><i class="iconfont icon-fasong"></i></a-button>
        </div> -->
    
    </div>
</template>

<script setup lang="ts">
import { TUIKit, TUIChat } from "@/TUIKit";

</script>

<style scoped lang="scss">
.message-box {
    width: 100%;
    height: 600px;
    max-height: calc(100vh - 155px);
    position: relative;

    .message-content {
        .message-item-other {
            display: flex;
            margin: 20px 0;

            .avatar {
                width: 40px;
                height: 40px;
                background-color: aqua;
                border-radius: 20px;
            }

            .content {
                margin-left: 15px;


                .name {
                    font-size: 10px;
                    margin-bottom: 5px;
                    display: flex;
                }

                .message {
                    border-radius: 0 5px 5px 5px;
                    background-color: rgb(74, 87, 103);
                    font-size: 12px;
                    width: 100%;

                    padding: 10px;

                    .time {
                        font-size: 10px;
                        color: rgb(145, 144, 144);
                    }
                }
            }
        }
        .message-item-self {
            margin: 20px 0;
            display: flex;
            flex-direction: row-reverse;

            .avatar-self {
                width: 40px;
                height: 40px;
                background-color: aquamarine;
                border-radius: 20px;
                margin-left: 30px;
            }

            .content-self {
                .name-self {
                    font-size: 10px;
                    margin-bottom: 5px;
                    display: flex;
                    flex-direction: row-reverse;
                    margin-right: -17px;
                }

                .message-self {
                    border-radius: 5px 0px 5px 5px;
                    background-color: rgb(19,27,38);
                    font-size: 12px;
                    width: 100%;
                    padding: 10px;

                    .time-self {
                        font-size: 10px;
                        color: rgb(145, 144, 144);
                    }
                }
            }
        }
    }

    .message-input {
        display: flex;
        flex-wrap: wrap;

    }

    :deep .ant-input {
        border: none;
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 60px;
        background-color: rgba(53, 70, 87, 1);
        padding: 0 20px;
        box-sizing: border-box;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        transition: box-shadow 0.3s ease;
        color: #fff;
        word-wrap: break-word;
        word-break: break-all;
    }
    :deep .ant-input::placeholder{
        color: #a7a4a4;
    }

    :deep .ant-btn {
        display: flex;
        justify-content: center;
        align-items: center;
        border: none;
        position: absolute;
        bottom: 15px;
        right: 10px;
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }
}
:deep{
    .tui-chat-message-list{
        max-height: 400px;
    }
}
</style>